package com.thunisoft.incremental.service;

import java.util.List;

import com.thunisoft.incremental.common.model.Datasource;
import com.thunisoft.incremental.common.model.Group;
import com.thunisoft.incremental.common.model.Task;
import com.thunisoft.incremental.common.model.TaskStatus;

/**
 * ManageService
 *
 * @author Zhang Xin
 * @version v1.0
 * @since 2020/3/27 15:46
 */
public interface ManageService {

    List<Datasource> getDatasources();
    List<Group> getGroup();
    List<Task> getTasksByGroup(String groupId,String searchName);
    List<TaskStatus> getTaskStatus(String groupId,String taskId,Integer status);


    void addTask(Task task);
    void addGroup(Group group);
    void addDatasource(Datasource datasource);

    void deleteTask(String taskId);
    long checkExistTaskByGroup(String groupId);
    void deleteGroup(String groupId);
    boolean checkExistTaskByDatasource(String datasourceId);
    void deleteDataSource(String datasourceId);


    void executeByGroupId(String groupId);
    void executeByTaskId(String taskId);

    boolean testDatabaseConnection(Datasource datasource) throws Exception;


}
